package com.hyzx.qbasic.admin.model.vo.res;

import com.hyzx.qbasic.admin.model.enums.ResStatus;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * Created by 黄江华 on 2018/5/15.
 */

@ApiModel
public class BaseResModel<T> {

    //返回的结果代码
    @ApiModelProperty("结果代码")
    private ResStatus status;

    //错误消息
    @ApiModelProperty("错误消息")
    private String msg;

    //结果数据
    @ApiModelProperty("返回结果")
    private T result;

    public BaseResModel(ResStatus status, String msg, T result) {
        this.status = status;
        this.msg = msg;
        this.result = result;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public int getStatus() {
        return status.getCode();
    }

    public void setStatus(ResStatus status) {
        this.status = status;
    }

    public T getResult() {
        return result;
    }

    public void setResult(T result) {
        this.result = result;
    }
}
